﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace PlanApp.ashx
{
    /// <summary>
    /// index 的摘要说明
    /// </summary>
    public class index : IHttpHandler
    {
        public int userID;
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //清除该页输出缓存，设置该页无缓存 
            context.Response.Buffer = true;
            context.Response.ExpiresAbsolute = System.DateTime.Now.AddMilliseconds(0);
            context.Response.Expires = 0;
            context.Response.CacheControl = "no-cache";
            context.Response.AppendHeader("Pragma", "No-Cache");
            //userID = Convert.ToInt32(context.Session["ID"].ToString());
            string part = context.Request["par"];
            switch (part)
            {
                case "open": getSelect(context);
                    break;
                default:
                    break;
            }
        }
        /// <summary>
        /// 下拉框选项值
        /// </summary>
        /// <param name="context"></param>
        private void getSelect(HttpContext context)
        {
            context.Response.Write(context.Request["sel"].ToString());
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}